<template>
	<view class="content">
		<!-- 第一部分 -->
		<u-card :full="true" :border="false" :border-radius="0" :head-border-bottom="false" :foot-border-top="false">
			<view class="search" slot="head" style="position: sticky;">
				<u-search placeholder="搜索症状/疾病/药品/医生/科室" shape="round" :clearabled="true" :animation="true" v-model="keyword"></u-search>
				<custom-icons type="lingsheng" size="28" style="color: #999999;"></custom-icons>
			</view>
			<view class="" slot="body">
				<view class="item">
					<custom-icons type="tiwen" size="35" style="color: #37afb7;"></custom-icons>
					<view class="desc">
						<view class="title">快速提问</view>
						<view>描述症状 自动匹配医生解答</view>
					</view>
				</view>
				<view class="item">
					<custom-icons type="wenjianchazhao" size="42" style="color: #37afb7;"></custom-icons>
					<view class="desc">
						<view class="title">找医生</view>
						<view>按科室快速找对医生 对症咨询</view>
					</view>
				</view>
			</view>
		</u-card>
		<!-- 热门科室 -->
		<u-card :full="true" :border="false" :border-radius="0" :head-border-bottom="false" :foot-border-top="false">
			<view slot="head">
				<u-section title="热门科室" sub-title="更多" :show-line="false"></u-section>
			</view>
			<view slot="body">
				<u-grid :col="4" :border="false">
					<u-grid-item>
						<custom-icons type="icon" size="50" style="color: #37afb7;"></custom-icons>
						<view class="grid-text">皮肤性病科</view>
					</u-grid-item>
					<u-grid-item>
						<custom-icons type="erke" size="50" style="color: #37afb7;"></custom-icons>
						<view class="grid-text">儿科</view>
					</u-grid-item>
					<u-grid-item>
						<custom-icons type="fuchanke-copy" size="50" style="color: #37afb7;"></custom-icons>
						<view class="grid-text">妇产科</view>
					</u-grid-item>
					<u-grid-item>
						<custom-icons type="miniaowaike_wuyuan" size="50" style="color: #37afb7;"></custom-icons>
						<view class="grid-text">泌尿外科</view>
					</u-grid-item>
				</u-grid>
				<u-grid :col="4" :border="false">
					<u-grid-item>
						<custom-icons type="guke_wuyuan" size="50" style="color: #37afb7;"></custom-icons>
						<view class="grid-text">骨科</view>
					</u-grid-item>
					<u-grid-item>
						<custom-icons type="neifenmike" size="50" style="color: #37afb7;"></custom-icons>
						<view class="grid-text">内分泌科</view>
					</u-grid-item>
					<u-grid-item>
						<custom-icons type="xinxieguan" size="50" style="color: #37afb7;"></custom-icons>
						<view class="grid-text">心血管科</view>
					</u-grid-item>
					<u-grid-item>
						<custom-icons type="shenjingke" size="50" style="color: #37afb7;"></custom-icons>
						<view class="grid-text">神经科</view>
					</u-grid-item>
				</u-grid>
			</view>
		</u-card>
		<!-- 最新问答 -->
		<u-card :full="true" :border="false" :border-radius="0" :head-border-bottom="false" :foot-border-top="false">
			<view class="" slot="head">
				<u-section title="最新问答" sub-title="换一换" :show-line="false" :right="false">
					<view slot="right">
						换一换 <u-icon name="reload"></u-icon>
					</view>
				</u-section>
			</view>
			<view class="list-body" slot="body">
				<uni-list>
					<view>
						<uni-list-item class="uni-list-item" :title="wen" :note="da"></uni-list-item>	
						<view class="dr-icon">
							<u-avatar :src="src" size="40"></u-avatar>
							<view> 蒋立峰 主治医师 骨科</view>
							<u-button class="btn" type="info" size="mini">优质问答</u-button>
						</view>
					</view>
					<view>
						<uni-list-item class="uni-list-item" :title="wen" :note="da"></uni-list-item>
						<view class="dr-icon">
							<u-avatar :src="src" size="40"></u-avatar>
							<view> 蒋立峰 主治医师 骨科</view>
							<u-button class="btn" type="info" size="mini">优质问答</u-button>
						</view>
					</view>
					<view>
						<uni-list-item class="uni-list-item" :title="wen" :note="da"></uni-list-item>
						<view class="dr-icon">
							<u-avatar :src="src" size="40"></u-avatar>
							<view> 蒋立峰 主治医师 骨科</view>
							<u-button class="btn" type="info" size="mini">优质问答</u-button>
						</view>
					</view>
				</uni-list>
			</view>
		</u-card>
		
		<u-button type="primary"  @click="goto('/pages/tabbar/tabbar-2/doctorInfo')">主治医师界面</u-button>
		<button @click="goto('/pages/dingdan/ddan')">1</button>
		<button></button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				keyword: "",
				right: "",
				wen: "患者问：29岁 男 膝盖背面窝出有不适 无外力损伤 经常运动 具体表现；1.久蹲后直立疼痛...",
				da: "您好，这个部位属于腘窝，有个常见的疾病是腘窝囊肿，不知道您是否能摸到这个部位有没有比对侧膝关节鼓起，主要表现...",
				src: "https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=3453133552,388720999&fm=26&gp=0.jpg"
			}
		},
		onLoad() {

		},
		methods: {
			goto(url) {
				// uni.navigateTo({
				// 	url: url
				// })
				this.$u.route(url);
			}
		}
	}
</script>

<style lang="scss">
	.content {
		text-align: center;
		padding-top: 55rpx;
		background-color: #faf8f8;

		// 第一部分
		.search {
			// width: 100%;
			display: flex;
		}

		.title {
			font-weight: bold;
		}

		.item {
			display: flex;
			text-align: left;
			margin-bottom: 30rpx;
			margin-left: 30rpx;

			.desc {
				margin-left: 30rpx;
			}
		}

		.grid-text {
			font-size: 28rpx;
			margin-top: 4rpx;
			color: $u-type-info;
		}

		// 最新问答
		.list-body {
			text-align: left;
		}

		.uni-list-item {
			margin-left: -27rpx;
		}

		.dr-icon {
			margin-bottom: 10rpx;
			display: flex;
			align-items: center;

			view {
				margin-left: 10rpx;
			}

			.btn {
				margin-right: 8%;
			}
		}
	}
</style>
